A cache memory is usually provided in a computer as a means of improving the processing speed. A cache memory is a memory with high access speed, and temporarily holds (caches) data loaded from the main memory. The processing device (processor) acquires data from the cache memory without accessing the main memory, which has a slower access speed, when the data to be acquired is in the cache memory.
Typically, the cache memory used by a processing device includes an instruction cache for holding program instructions and a data cache for holding data to be processed. The cache memory holds data in units called cache lines. In the case of the instruction cache, the data to be held are sequences of instructions.
However, when looking at the code size of a cache line for executable code of the instruction sequences, the same code sequence is often held multiple times. For example, save instructions in the register during a task switch and in line code are likely to be the same code sequence. As a result, the instruction cache holds the same code sequence multiple times, and a significant amount of redundancy occurs in the cache content. Examples of this issue have been further shown in “Marios Kleanthous et al., “Dynamically Detecting Cache Content Duplication in Instruction Caches”, Department of Computer Science, University of Cyprus, February 2007, TR-07-03” and “Marios Kleanthous et al., “The Duplication of Content in Instruction Caches and its Performance Implications”, Department of Computer Science, University of Cyprus, January 2005, CS-TR-01-2005”.